<template>
	<view v-show="show">
		<view style="display: block;">
			<view class="cus_mask" v-show="show" @click="hide" @touchmove.prevent></view>
		</view>
		<view class="volet_clos" :class="[show?classname:'']">
			<view class="top">
				<view class="cus_top_cancel" @click="hide">取消</view>
				<view class="cus_top_confirm" @click="hide">确定</view>
				<!-- <icon class="iconfont icon-RectangleCopy18" @click="hide"></icon> -->
			</view>
			<view :style="{height: halfHeight}" style="margin-top: 10%;overflow: auto;padding: 5%;">
				<slot />
			</view>
		</view>
	</view>

</template>

<script>
	export default {
		data() {
			return {
				show: false,
				halfHeight: "75%"
			}
		},
		methods: {
			open() {
				this.show = true;
			},
			hide() {
				console.log(888888888);
				this.show = !this.show
				console.log(this.show);
				//slot  中内容先隐藏
				//setTimeout(()=>{
				//	this.$emit('onHide')
				//},600)
			},
		},
		props: ["classname"],
	}
</script>
<style>
	.cus_mask {
		width: 100%;
		height: 100%;
		position:fixed;
		z-index: 999;
		top: 0;
		right: 0;
		left: 0;
		bottom: 0;
		background: rgba(0, 0, 0, .5);
	}

	.top {
		width: 100%;
		text-align: right;
		position: fixed;
		height: 90rpx;
		display: flex;
		align-items: center;
		justify-content: space-between;


	}

	.top::after {
		content: "";
		position: absolute;
		left: 0;
		bottom: 0;
		right: 0;
		height: 1px;
		clear: both;
		border-bottom: 1px solid #e5e5e5;
		color: #e5e5e5;
		-webkit-transform-origin: 0 100%;
		transform-origin: 0 100%;
		-webkit-transform: scaleY(.5);
		transform: scaleY(.5);
	}

	.cus_top_cancel {
		font-size: 17px;
		line-height: 45px;
		overflow: hidden;
		cursor: pointer;
		display: block;
		max-width: 50%;
		top: 0;
		height: 100%;
		box-sizing: border-box;
		padding: 0 14px;
		color: #888;
	}

	.cus_top_confirm {
		font-size: 17px;
		line-height: 45px;
		overflow: hidden;
		cursor: pointer;
		display: block;
		max-width: 50%;
		top: 0;
		height: 100%;
		box-sizing: border-box;
		padding: 0 14px;
		color: #007aff;
	}

	.volet_clos {
		transition: height 0.3s ease-out, opacity 0.6s ease-in, visibility 0.2s ease-in;
		bottom: 0;
		position: fixed;
		height: 0;
		width: 100%;
		background-color: white;
		z-index: 99;
	}

	.active300 {
		height: 35%;
		opacity: 1;
		visibility: 1;
		z-index: 9999;
		left: 0;
	}

	.active500 {
		opacity: 1;
		visibility: 1;
		height: 50%;
		z-index: 9999;
		left: 0;
	}

	.active600 {
		opacity: 1;
		visibility: 1;
		height: 60%;
		z-index: 9999;
		left: 0;
	}

	.active800 {
		opacity: 1;
		visibility: 1;
		height: 80%;
		z-index: 9999;
		left: 0;
	}

	.active900 {
		opacity: 1;
		visibility: 1;
		height: 90%;
		left: 0;
		z-index: 9999;
	}

	.active {
		opacity: 1;
		visibility: 1;
		height: 100%;
		z-index: 9999;
	}

	.iconfont {
		font-size: 55rpx;
		margin-top: 10rpx;

	}
</style>
